package com.huluobo.a2109monthdemo2.category

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2109monthdemo2.R
import com.huluobo.a2109monthdemo2.utils.ImageUtils

/**
 *  Created by LC on 2024/2/18.
 */
class CategoryChildAdapter(list: MutableList<CategoryBean>) :
    BaseQuickAdapter<CategoryBean, BaseViewHolder>(R.layout.item_category_child, list) {
    override fun convert(helper: BaseViewHolder, item: CategoryBean) {
        helper.setText(R.id.item_category_child_tv, item.category_name)
        if (item.category_icon != null) {
            ImageUtils.loadImage(context, item.category_icon, helper.getView(R.id.item_category_child_iv))
        }
    }
}